fix(iOS): fix Prettier lint failure after SwiftPM support landed#57564
Closed
cipolleschi wants to merge 1 commit into
Closed
fix(iOS): fix Prettier lint failure after SwiftPM support landed#57564cipolleschi wants to merge 1 commit into
cipolleschi wants to merge 1 commit into
Conversation
The Flow comment-type annotation on the uninitialized `let tmp` was reformatted by Prettier (moving the comment past the semicolon and detaching the annotation), which broke the lint job's format-check step. Giving `tmp` an initializer keeps the `/*: string */` annotation inline and satisfies Prettier.
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D112114604. |
chrfalch
approved these changes
Jul 15, 2026
cortinico
approved these changes
Jul 15, 2026
cortinico
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
|
@cipolleschi merged this pull request in a693f41. |
cipolleschi
added a commit
that referenced
this pull request
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The OSS lint job went red after the SwiftPM stack landed (#57332 and its base PRs). The failing signal is the Prettier step of the
lintjob.The offending file (introduced in base PR #57442) is:
packages/react-native/scripts/ios-prebuild/__tests__/headers-xcframework-test.jsThis is a Flow comment-type annotation on an uninitialized
let. Prettier reformats an uninitialized declaration by moving the trailing comment past the semicolon:Because CI runs
prettier --list-different(fails on any diff), this made the lint job fail. Prettier only keeps the/*: string */annotation inline when the declaration has an initializer, so the fix is to givetmpone:Semantically safe —
tmpis assigned inbeforeEachbefore any use.Changelog:
[INTERNAL] [FIXED] - Fix Prettier lint failure in
headers-xcframeworktestTest Plan
yarn format-check— clean across the repoyarn lint(ESLint) — passesyarn lint-markdown— passesyarn test-typescript-legacy— passesheaders-xcframework-test.js— all 5 tests pass